﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows;

namespace VisualTools.Controls.Converters
{
    class CanResizeAndWindowState2VisibilityMultiConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var resizeMode = (ResizeMode)values[0];
            if(resizeMode == ResizeMode.NoResize || resizeMode == ResizeMode.CanMinimize)
                return Visibility.Collapsed;
            var state = (WindowState)values[1];
            if (state.ToString() != parameter.ToString())
                return Visibility.Visible;
            return Visibility.Collapsed;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
